import { Photo } from 'src/model/photo.entity';
import { createConnection } from 'typeorm';

export const databaseProviders = [
  {
    provide: 'DATABASE_CONNECTION',
    useFactory: async () => await createConnection({
      type: 'mysql',
      host: '49.234.54.97',
      port: 3306,
      username: 'root',
      password: 'Lzx0203.',
      database: 'zoom_db',
      entities: [
          Photo
      ],
      synchronize: true,
    }),
  },
];
